package mint.modules.generator.expression;

import java.util.Formatter;
import java.util.List;

import org.antlr.runtime.tree.Tree;

import mint.modules.generator.Scope;
import mint.modules.type.Type;

public class ConditionalExprNode extends Expression {
	private Expression conditionalOrExpr;

	public ConditionalExprNode(Scope theParent, ExpressionType exprType, Tree condExprTree) {
		super(theParent, exprType);
		conditionalOrExpr = new ConditionalOrExprNode(theParent, exprType, condExprTree);
	}

	@Override
	public void testSemantic() {
		conditionalOrExpr.testSemantic();
	}

	@Override
	public List<String> getSemanticErrors() {
		return conditionalOrExpr.getSemanticErrors();
	}

	@Override
	public void emit(Formatter output) {
		conditionalOrExpr.emit(output);
	}

	@Override
	public int getLine() {
		return conditionalOrExpr.getLine();
	}

	@Override
	public Type getType() {
		return conditionalOrExpr.getType();
	}

	@Override
	public void leftEmit(Formatter output) {
		conditionalOrExpr.leftEmit(output);
		
	}

}
